{{ .dataGrid }}

<!-- 查看详细信息 -->
<div id="wechat_member_list_detail_dialog" class="easyui-dialog word-wrap" title="查看粉丝信息"
     data-options="modal:true,closed:true,iconCls:'icons-other-information',buttons:[text:'关闭',iconCls:'icons-arrow-cross',handler:function(){$('#wechat_member_list_detail_dialog').dialog('close');}}]"
     style="width:700px;height:450px;padding:5px"></div>

<script type="text/javascript">
    var wechat_member_list_datagrid_id = 'wechat_member_list_datagrid';

    //搜索
    function systemLogSearch(that) {
        var queryParams = $('#' + wechat_member_list_datagrid_id).datagrid('options').queryParams;
        $.each($(that).parent('form').serializeArray(), function () {
            queryParams[this['name']] = this['value'];
        });
        $('#' + wechat_member_list_datagrid_id).datagrid('reload');
    }


    //参数格式化
    function optFormatter(val) {
        return '<a href="javascript:;" onclick="editMemberInfo(' + val + ');">查看信息</a>';
    }

    function enabledFormatter(val) {
        return val == 1 ? '启用' : '关闭';
    }

    function verifyTokenFormatter(val) {
        return val == "" ? '已验证' : '未验证'
    }

    //查看详细信息
    function editMemberInfo(artid) {
        ajaxLoading()
        $.get("/b/wechat/userinfo",{id: artid}, function (data) {
            ajaxLoadEnd()
            if (data.errcode) {
                $.messager.error(data.errmsg)
                return
            }
            var data = data.errmsg
            var id = 'wechat_member_list_detail_dialog';
            $('#' + id).dialog({
                content: `
        	    <form id="ff" method="post">
	    	<table cellpadding="5" class="dialogtable">
	    	    <input type="hidden" name="id" value="`+artid+`">

	    	    <tr>
	    			<td style="width: 100px;" align="right">openid:</td>
	    			<td><input class="easyui-textbox" type="text" name="openid" value="${data.openid}"></input></td>
	    		</tr>

	    		<tr>
	    			<td style="width: 100px;" align="right">昵称:</td>
	    			<td><input class="easyui-textbox" type="text" name="nickname" value="${data.nickname}" readonly></input></td>
	    		</tr>

	    			<tr>
	    			<td align="right">头像:</td>
	    			<td><img src="${data.headimgurl}" onerror="this.src='/assets/default_man.png'" width="120px" height="120px"/> </td>
	    		</tr>

	    		<tr>
	    			<td align="right">关注场景:</td>
	    			<td><input class="easyui-textbox" type="text" value="${data.subscribe_scene}" readonly></input></td>
	    		</tr>

	    		<tr>
	    			<td align="right">关注时间:</td>
	    			<td><input class="easyui-textbox" type="text" value="${data.time}" readonly></input></td>
	    		</tr>

	    	</table>
	    </form>
        `
            });
            $('#' + id).dialog('open');
        })
    }
</script>
